package com.example.cafe.work.util;

import org.springframework.stereotype.Component;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
//import java.util.UUID;
import cn.hutool.core.lang.UUID;

@Component
public class Uuid {
    public static String getid(){
        return UUID.randomUUID().toString().replaceAll("-","");
    }
    public static String getTime(){
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        return LocalDateTime.now().format(formatter);
    }
    public static String getToken(){
        return UUID.randomUUID().toString(true);
    }
}
